﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using HighLandirect.Applications.Controllers;
using HighLandirect.Applications.Test.Services;
using HighLandirect.Applications.Test.Views;
using HighLandirect.Applications.ViewModels;

namespace HighLandirect.Applications.Test.Controllers
{
    public class TestController
    {
        private readonly CompositionContainer container;
        

        public TestController()
        {
            /*
            AggregateCatalog catalog = new AggregateCatalog();
            catalog.Catalogs.Add(new TypeCatalog(
                typeof(ApplicationController), typeof(ProductController), typeof(CustomerController), typeof(EntityControllerMock),
                typeof(PresentationControllerMock),
                typeof(ShellViewModel), typeof(ProductViewModel), typeof(CustomerViewModel)
            ));
            catalog.Catalogs.Add(new TypeCatalog(
                typeof(QuestionServiceMock), typeof(MessageServiceMock), typeof(EntityServiceMock),
                typeof(ShellViewMock), typeof(ProductListViewMock), typeof(ProductViewMock), typeof(CustomerListViewMock), 
                typeof(CustomerViewMock), typeof(OrderListViewMock)
            ));
            container = new CompositionContainer(catalog);
            CompositionBatch batch = new CompositionBatch();
            batch.AddExportedValue(container);
            container.Compose(batch);
             */
            AggregateCatalog catalog = new AggregateCatalog();
            container = new CompositionContainer(catalog);
        }


        public CompositionContainer Container { get { return container; } }
    }
}
